<%@ page language="java" import="java.util.*"  import="model.LyTable" import="db.DB" pageEncoding="gb2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>Message Infomation</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
<body bgcolor="#e3e3e3">
	<form action="meassage.jsp" method="post">
    	<table border="1">
          <caption>All Massage Infomation</caption>
          <tr><th>Name</th><th>Time</th>
          			<th>Tile</th><th>Content</th></tr>
			
		  <%
		    ArrayList al=(ArrayList)session.getAttribute("al");
		    Iterator iter=al.iterator();
		    while(iter.hasNext()){
		    	LyTable ly=(LyTable)iter.next();
		   %>
		  	<tr><td><%=new DB().getUserName(ly.getUserId()) %></td>
		  		<td><%=ly.getDate().toString() %></td>
		  		<td><%=ly.getTitle() %></td>
		  		<td><%=ly.getContent() %></tr>
		  <%
		  		}
		  %>
        </table>
        <input type="submit" value="Sumit" />
    </form>
</body>
</html>
